package principal.view.gui;

import java.awt.Dimension;
import java.awt.event.ActionListener;

import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.event.TreeSelectionListener;

import principal.controller.CTreeKits;

import principal.view.gui.altaComponente.AltaKitsMain;
import principal.view.gui.model.MyModelTree;



public class TreeKits extends JTree{
	AltaKitsMain kitMain;
	
	public  TreeKits(AltaKitsMain kitMain){
		
		this.kitMain = kitMain;
		
		MyModelTree modeloTree  = new MyModelTree(kitMain);		
		setPreferredSize(new Dimension(200,580));			    
	    setModel(modeloTree);
	   
	    CTreeKits ctk = new CTreeKits(this);
	   
	}	
	
	public void listenerTreeSelection(TreeSelectionListener listener) {
		this.addTreeSelectionListener(listener);
	}
	
	public AltaKitsMain getKitMain(){
		return kitMain;
	}
		
}
